package com.fac.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 维修统计VO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "维修统计返回对象")
public class MaintenanceStatVO implements Serializable {

    @ApiModelProperty(value = "维修订单总数", example = "100")
    private Integer totalOrders;

    @ApiModelProperty(value = "已完成维修订单数", example = "80")
    private Integer completedOrders;

    @ApiModelProperty(value = "平均维修时间（小时）", example = "24")
    private Integer avgRepairTime;

    @ApiModelProperty(value = "总维修费用", example = "50000.00")
    private BigDecimal totalRepairFee;

    @ApiModelProperty(value = "设备故障排名")
    private List<EquipmentRanking> equipmentRanking;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @ApiModel(description = "设备故障排名")
    public static class EquipmentRanking implements Serializable {

        @ApiModelProperty(value = "设备名称", example = "数控车床")
        private String equipmentName;

        @ApiModelProperty(value = "故障次数", example = "5")
        private Integer faultCount;

        @ApiModelProperty(value = "维修费用", example = "10000.00")
        private BigDecimal repairFee;
    }
} 